<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <script>


    var message = "Global Message"
    var obj = {
      name: "why"
    }

    function test() {

    }

    function bar() {
      console.log("bar function")
      test()
      test()
      var address = "bar"
    }

    function foo(num) {
      var message = "Foo Message"

      bar()

      var age = 18
      var height = 1.88
      console.log("foo function")
    }
    
    foo(123)

    var num1 = 10
    var num2 = 20
    var result = num1 + num2
    console.log(result)


  </script>

</body>
</html>